class Solution(object):
    def countOdds(self, low, high):
        diff = high - low
        if diff % 2 == 0:
            if low % 2 == 1:
                return diff // 2 + 1
            else:
                return diff // 2
        else:
            return (1 + diff) // 2
